<?php

/**
* pipapai - user_joomla
*
*/
require_once(OC::$SERVERROOT.'/apps/joomla/application.php');
require_once(OC::$SERVERROOT.'/apps/user_joomla/user_joomla.php');

//General Hooks
//OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_USER_JOOMLA_Hooks', 'createUser');
//OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_USER_JOOMLA_Hooks', 'deleteUser');
OCP\Util::connectHook('OC_User', 'logout', 'OC_USER_JOOMLA_Hooks', 'logout');

// init pipapai application 
PFactory::init();

// OCP\App::registerAdmin('user_joomla', 'settings');

$userBackend  = new OC_USER_JOOMLA();

OC_User::useBackend($userBackend);

// add settings page to navigation
/*
$entry = array(
	'id' => "user_joomla_settings",
	'order'=>1,
	'href' => OC_Helper::linkTo( "user_joomla", "settings.php" ),
	'name' => 'JOOMLA'
);
*/
